///////////////////////////////////////////////////////////////////////////
//																		 //
//	Author:		Michael Mozdzierz										 //
//	Date:		10/25/2014												 //
//	Purpose:	Define a particle effector that manipulates particles	 //
//				within a given radius									 //
//																		 //
///////////////////////////////////////////////////////////////////////////

#ifndef _PARTICLE_EFFECTOR_H
#define _PARTICLE_EFFECTOR_H

#include "../../EdgeMath\Vectors.h"
#include "../../EdgeMath\Geometry.h"

struct Particle;

struct ParticleEffector
{
	// the bounding sphere for the emitter
	Sphere3D sphere;

	// blend color for the particles
	Vector4 color = Vector4(1.f, 1.f, 1.f, 1.f); // default to white

	// velocity for particless
	Vector3 velocity;
	// acceleration for the particles
	Vector3 acceleration;

	// the current rotation, in radians of the particles
	float rotation = 0.f;
	// the rate of change in rotation for the particles
	float rotation_speed = 0.f;

	// the alpha value for the particles
	float alpha = 1.f;

	// the size for the particles
	float size = 1.f;

	// the ammount of time particles have left to live
	float lifetime;

	ParticleEffector(void);
	ParticleEffector(Sphere3D& sphere);

	void Effect(Particle* particle);
};

#endif